$(function () {
    var pjIds = $("#pjIds").val();
    $('#grid_pjgl_pjts').datagrid({
        url: $.webPath() + "/zjgl/pjgl/pjList?pjIds=" + pjIds,
        fit: true,
        fitColumns: true,
        singleSelect: true,
        pagination: true,
        toolbar: "#pjts_toolbar",
        pageNumber: 1,
        pageSize: 10,
        rownumbers: true,
        columns: [
            [
                {field: 'pjlx', title: '票据类型', width: 15, align: 'center',
                    formatter: function (value) {
                        if (value == '0')
                            return '银票';
                        else
                            return '商票';
                    }},
                {field: 'pjhm', title: '票据号码', width: 15, align: 'center'},
                {field: 'dqje', title: '金额', width: 30, align: 'right', formatter: function (value) {
                    var sl = formatJe(value, ",");
                    return sl;
                }},
                {field: 'dqr', title: '到期日', width: 30, align: 'center'}
            ]
        ]
    });
    $("#pjts_gsmcId").jgbmtree($("#pjts_bmmc_Id"), $("#pjts_sqr_Id"), $("#pjts_bmmc_Id").val(), $("#pjts_sqr_Id").val(), {
        onLoadSuccess: function () {
            $("#pjts_gsmcId").combotree('readonly', true);
        }
    });

});